<li id="choice_supplier_category" style="display: list-item;">
	<label>供应商类别：</label>
	<span class="ui-tree-wrap" id="supplier_category_wrap" style="width:142px;position: relative;overflow: visible;">
		<input type="text" class="input-txt" style="width:116px" id="choice_supplier_category_name" autocomplete="off"
			placeholder="全部" {if condition='isset($info.category_name)' } value="{$info.category_name}" {else/}
			value="全部" {/if}><span class="trigger" id="trigger_supplier_category"
			onclick="choice_supplier_category()"></span>
	</span>
</li>
<input type="hidden" id="supplier_category_id" name="category_id" {if condition='isset($info.category_id)' }
	value="{$info.category_id}" {else/} value="0" {/if} autocomplete="off" readonly="">
<!-- <input type="hidden" id="supplier_category_id" name="category_id" value="" autocomplete="off" readonly=""> -->

<script type="text/javascript">
	$(document).ready(function () {
		$('#supplier_category_tt').tree({
			url: 'getSupplierCategory.html',
			// checkbox:true,
			onClick: function (node) {
				console.log(node);
				//供应商类别
				$("#supplier_category_id").val(node.id);
				$("#choice_supplier_category_name").val(node.name);
				$("#supplier_category_Box").hide();
			}
		});

	})
	//选择供应商类别-选择框外点击则隐藏
	$(document).mouseup(function (e) {
		if (e.target.id != "trigger_supplier_category") {
			var con = $("#supplier_category_Box");   // 设置目标区域
			if (!con.is(e.target) && con.has(e.target).length === 0) {
				$("#supplier_category_Box").hide();
			}
		}
	});

	// 顶部搜索下拉选择窗口(供应商类别)
	function choice_supplier_category() {
		var top = $("#supplier_category_wrap").offset().top;
		var left = $("#supplier_category_wrap").offset().left;
		var width = $("#supplier_category_wrap").width();
		$("#supplier_category_Box").toggle();
		$("#supplier_category_Box").css({ "top": (top + 30) + "px", "left": (left) + "px", "minWidth": width + "px" });
	}
</script>